﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using System.Threading;

namespace CDSBDemandControlServiceAux
{
    partial class CDSBDemandControlServiceAux : ServiceBase
    {
        Principal main;
        public CDSBDemandControlServiceAux()
        {
            main = new Principal(); ;
            InitializeComponent();
        }

        protected override void OnStart(string[] args)
        {
            Thread thr = new Thread(new ThreadStart(main.Run));
            thr.Start();
        }

        protected override void OnStop()
        {
            main.Dispose(true);
        }
    }
}
